home *** CD-ROM | disk | FTP | other *** search
/ PC Open 97 / PC Open 97 CD2.bin / Demo / FileMaker / Data1.cab / email_ws.xslt4 < prev    next >
Encoding:
Extensible Markup Language  |  2002-06-04  |  3.4 KB  |  87 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  3. <!--
  4. File: email_ws.xslt
  5.  
  6. A very simple stylesheet to transform the resulting XML of the 
  7. Eraserver email validating web service into FMPXMLRESULT grammar.
  8.       
  9. ===============================================================
  10.  
  11. Copyright ┬⌐ 2002 FileMaker, Inc.
  12. All rights reserved.
  13.  
  14. Redistribution and use in source and binary forms, with or
  15. without modification, are permitted provided that the following
  16. conditions are met:
  17.  
  18. * Redistributions of source code must retain the above copyright
  19.   notice, this list of conditions and the following disclaimer.
  20.  
  21. * Redistributions in binary form must reproduce the above copyright
  22.   notice, this list of conditions and the following disclaimer in 
  23.   the documentation and/or other materials provided with the
  24.   distribution.
  25.  
  26. * Neither the name of the FileMaker, Inc. nor the names of its 
  27.   contributors may be used to endorse or promote products derived
  28.   from this software without specific prior written
  29.   permission.
  30.  
  31. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  32. CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  33. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  34. MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
  35. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 
  36. ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
  37. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  38. SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  39. BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  40. WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  41. NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  42. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  43.     
  44. ===============================================================
  45. -->
  46. <!--
  47. The web service is available (as of June 4, 2002) at:
  48. http://webservices.eraserver.net/mxchecker/mxchecker.asmx?op=bCheckEmail
  49.    
  50. It is invoked via an HTTP request in this form:
  51. http://webservices.eraserver.net/mxchecker/mxchecker.asmx/bCheckEmail?accessCode=9999&emailAddress=postmaster@filemaker.com
  52.       
  53. The resulting XML is in this format:
  54. <boolean xmlns="http://webservices.eraserver.net/MXChecker">true</boolean>
  55.  
  56. If the email address passed to the web service is valid,
  57. it returns "true" in the boolean element, otherwise it returns "false"
  58. -->
  59.     <xsl:template match="/*">
  60.         <FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
  61.             <ERRORCODE>0</ERRORCODE>
  62.             <PRODUCT BUILD="" NAME="" VERSION=""/>
  63.             <DATABASE DATEFORMAT="M/d/yyyy" LAYOUT="" NAME="" RECORDS="1" TIMEFORMAT="h:mm:ss a"/>
  64.             <METADATA>
  65.                 <FIELD>
  66.                     <xsl:attribute name="EMPTYOK">YES</xsl:attribute>
  67.                     <xsl:attribute name="MAXREPEAT">1</xsl:attribute>
  68.                     <xsl:attribute name="NAME">emailvalid</xsl:attribute>
  69.                     <xsl:attribute name="TYPE">TEXT</xsl:attribute>
  70.                 </FIELD>
  71.             </METADATA>
  72.             <RESULTSET>
  73.                 <xsl:attribute name="FOUND">1</xsl:attribute>
  74.                 <ROW>
  75.                     <xsl:attribute name="MODID">0</xsl:attribute>
  76.                     <xsl:attribute name="RECORDID">0</xsl:attribute>
  77.                     <COL>
  78.                         <DATA>
  79.                             <xsl:value-of select="."/>
  80.                         </DATA>
  81.                     </COL>
  82.                 </ROW>
  83.             </RESULTSET>
  84.         </FMPXMLRESULT>
  85.     </xsl:template>
  86. </xsl:stylesheet>
  87.